var expressJWT = require("express-jwt");
var jwtAuth = expressJWT({
    secret: "jiaMi",
    credentialsRequired: false
}).unless({
    // 排除不需要验证的路由
    path: ['/user/login', '/user/register', '/admin/login', '/admin/loginer', '/admin/Register', '/admin/adminIndex/']
});
module.exports = jwtAuth;

// var jwtAuth2 = expressJWT({
//     secret:"myKey",
//     credentialsRequired:false
// }).unless({
//     path:['/user/login']
// });
// module.exports = jwtAuth2;
